<?php
include("connection/connection.php");
if(isset($_POST['delete']))
{
$sourceId=$_POST['srcId'];
$loc_id=$_POST['loc_id'];
$qr="delete from tbl_dtls_q1_sws where id='$sourceId'";
$res=mysql_query($qr);
if($res)
{
$update_query="update tbl_dtls_q1_main set no_sources=(no_sources-1) where id='$loc_id'";
$res=mysql_query($update_query);
header("location:q1_rwss_edit.php");
}
}		
?>